<script language="javascript" src="{{$s_path}}/ueditor/ueditor.config.js"></script>
<script language="javascript" src="{{$s_path}}/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="{{$s_path}}/ueditor/lang/zh-cn/zh-cn.js"></script>
 <form method="post" action="admins.php?act={{$act}}"  name="article_form">
<article class="module width_full" id="article_add">
    <header>
      <h3>编辑文章</h3>
    </header>
    
    <div class="module_content">
   
      <fieldset>
        <label>标题</label>
        <input type="text" name="title" value="{{$article.title}}">
      </fieldset>
        <fieldset>
       
        <label>分类</label>
        <select style="width:92%;" name="cat_id">
          <option>请选择</option>
          {{foreach from=$cat_list item=list key=key}}
          <option value="{{$list.cat_id}}" {{if $article.cat_id==$list.cat_id}}selected="true"{{/if}}>{{$list.cat_name}}</option>
          	 {{foreach from=$list.children item=s_list key=s_key}}
         	 <option value="{{$s_list.cat_id}}" {{if $article.cat_id==$s_list.cat_id}}selected="true"{{/if}}>{{$s_list.cat_name}}</option>
          	{{/foreach}}
          {{/foreach}}
        
        </select>
      </fieldset>
     <!-- <fieldset style="width:48%; float:left;">
       
        <label>作者</label>
        <input type="text" style="width:92%" name="author" value="{{$article.author}}">
      </fieldset>
      <fieldset style="width:48%; float:left;;margin-right: 3%;">
      
        <label>keywords</label>
        <input type="text" style="width:92%;" name="keywords" value="{{$article.keywords}}">
      </fieldset>
      <fieldset style="width:48%; float:left;">
      
        <label>description</label>
        <input type="text" style="width:92%;" name="description" value="{{$article.description}}">
      </fieldset>
      <fieldset style="width:48%; float:left;">
       
        <label>关联商品ID</label>
        <input type="text" style="width:92%;">
      </fieldset>-->
      <div class="clear"></div>
      <fieldset>
       
        <textarea rows="12" name="content" id="content" style="height:300px;">{{$article.content}}</textarea>
        <script>
		
          UE.getEditor('content');
        </script>
      </fieldset>
    
      <div class="clear"></div>
    </div>
    <footer>
      <div class="submit_link">
        <select name="is_open">
          <option value="1">是否显示?</option>
          <option value="1" {{if $article.is_open==1}}selected="true"{{/if}}>是</option>
          <option value="0" {{if $article.is_open==0}}selected="true"{{/if}}>否</option>
        </select>
        <input type="hidden" name="a_id" value="{{$article.article_id}}"/>
        <input type="submit" value="发布" class="alt_btn" onclick="return AD.articleEdit('#article_add')">
       </div>
    </footer>
  </article>
</form>